{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "感知机是一种线性分类模型，属于判别模型。对输入的实例进行2分类（+1，-1）.\n",
    "- 由输入空间到输出空间的如下函数称为感知机 \n",
    "$$f(x)=sign(w \\cdot x+b)$$\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 感知机学习策略\n",
    " 1. 数据据的线性可分性\n",
    "\n",
    "    即存在超平面$w \\cdot x+b$ 可以将数据集的正实例点和负实例点完全正确地划分到超平面的两侧。\n",
    "    \n",
    "    对$y_i=+1$的实例$i$，有$w \\cdot x_i+b >0$,\n",
    "    \n",
    "    对$y_i=-1$的实例$i$，有$w \\cdot x_i+b <0$\n",
    "    \n",
    "    \n",
    " 2. 感知机学习策略\n",
    "\n",
    "    确定w，b即可，确定一个学习策略，即定义（经验）损失函数并将损失函数极小化。这里取损失函数为误分类点到超平面S的总距离（所有距离之和）。定义为 \n",
    "    $$L(w,b) = - \\sum_{x_i \\in M} y_i(w \\cdot x_i+b)$$\n",
    "\n",
    "    其中M是误分类点的集合，$- y_i(w \\cdot x_i+b) > 0$ ,$L(w,b)$ 是非负的"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 感知机学习算法\n",
    "\n",
    "使用随机梯度下降法最小化损失函数:感知机学习算法是误分类驱动的。首先任意选取一个超平面$w_0,b_0$,ran'hou'yong'sui"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
